<template>
	<view>

		<!--招聘进度条-->
		<view class="d-neikuang-10 d-shang-10  d-yuanjiao-10 " :style="{'background-color': fenggeyanse =='light'? '#fff4f4':'#0d0d0d'}" @click="tiezi(acid,aid)">
		
			<u-divider-d
			        text="招聘要求"
			        textColor="#cf1212"
			        lineColor="#fff4f4"
					ico="chat"
					color="#cf1212"
			></u-divider-d>

			<view>
				<view class="d-wenzi-14">
				<text class="d-wenzi-yanse-hui">薪资待遇</text>
				<text class="d-zuo-10 d-wenzi-18 d-wenzi-yanse-hongse">{{xinzis['dijia']}} ~ {{xinzis['gaojia']}}</text> 
				<text v-if="xinzis['danwei'] == 1" class="d-zuo-10 d-wenzi-18 d-wenzi-yanse-hongse">
					/ 月
				</text>
				<text v-if="xinzis['danwei'] == 2" class="d-zuo-10 d-wenzi-18 d-wenzi-yanse-hongse">
					/ 天
				</text> 
				<text v-if="xinzis['danwei'] == 3" class="d-zuo-10 d-wenzi-18 d-wenzi-yanse-hongse">
					/ 小时
				</text> 
				</view>
			</view>
			<view class="d-shang-5">
				<view class="d-wenzi-14 ">
				<text class="d-wenzi-yanse-hui">学历要求</text>
				<text v-if="zpyqs['xueli'] == '1'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">本科</text>
				<text v-else-if="zpyqs['xueli'] == '2'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">大专</text>
				<text v-else-if="zpyqs['xueli'] == '3'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">中专</text>
				<text v-else-if="zpyqs['xueli'] == '4'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">高中</text>
				<text v-else-if="zpyqs['xueli'] == '5'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">研究生</text>
				<text v-else-if="zpyqs['xueli'] == '6'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">博士</text>
				<text v-else-if="zpyqs['xueli'] == '7'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">不限</text>
				<text v-else-if="zpyqs['xueli'] == '8'" class="d-zuo-10 d-wenzi-16 d-wenzi-hei">初中</text>
				</view>
			</view>
			<view class="d-shang-5">
				<view class="d-wenzi-14">
					<text class="d-wenzi-yanse-hui">性别要求  </text>
				<text v-if="zpyqs['xingbie'] == 1" class="d-zuo-10 d-wenzi-16  d-wenzi-hei">男</text>
				<text v-else-if="zpyqs['xingbie'] == 2" class="d-zuo-10 d-wenzi-16  d-wenzi-hei">女</text>
				<text v-else-if="zpyqs['xingbie'] == 10" class="d-zuo-10 d-wenzi-16  d-wenzi-hei">男女不限</text>
				</view>
			</view>
			<view class="d-shang-5">
				<view class="d-wenzi-14">
					<text class="d-wenzi-yanse-hui">招聘人数  </text>
					<text class="d-zuo-10 d-wenzi-18  d-wenzi-hei">{{zprs}} (人)</text>
				</view>
			</view>
			<view v-if="liebiao == 1" class="d-shang-5">
				<view class="d-wenzi-14 ">
					<text class="d-wenzi-yanse-hui">工作时间  </text>
					<text class="d-zuo-10 d-wenzi-18  d-wenzi-hei">{{zhaopinintime}} ~ {{zhaopinuntime}}</text>
				</view>
			</view>
			<view class="d-shang-5">
				<view class="d-wenzi-14  d-wenzi-hei">
				<text class="d-wenzi-yanse-hui">工作经验</text>
				<text v-if="zpyqs['gongling'] == 1" class="d-zuo-10 d-wenzi-16 ">1年以上</text>
				<text v-if="zpyqs['gongling'] == 2" class="d-zuo-10 d-wenzi-16">2年以上</text>
				<text v-if="zpyqs['gongling'] == 3" class="d-zuo-10 d-wenzi-16">3年以上</text>
				<text v-if="zpyqs['gongling'] == 4" class="d-zuo-10 d-wenzi-16">4年以上</text>
				<text v-if="zpyqs['gongling'] == 5" class="d-zuo-10 d-wenzi-16">5年以上</text>
				<text v-if="zpyqs['gongling'] == 6" class="d-zuo-10 d-wenzi-16">6年以上</text>
				<text v-if="zpyqs['gongling'] == 7" class="d-zuo-10 d-wenzi-16">7年以上</text>
				<text v-if="zpyqs['gongling'] == 8" class="d-zuo-10 d-wenzi-16">8年以上</text>
				<text v-if="zpyqs['gongling'] == 9" class="d-zuo-10 d-wenzi-16">9年以上</text>
				<text v-if="zpyqs['gongling'] == 10" class="d-zuo-10 d-wenzi-16">10年以上</text>
				<text v-if="zpyqs['gongling'] == 11" class="d-zuo-10 d-wenzi-16">不限</text>
				
				<text v-if="zpyqs['dinianling'] == 18" class="d-zuo-10 d-wenzi-16">18 岁</text>
				<text v-if="zpyqs['dinianling'] == 16" class="d-zuo-10 d-wenzi-16">16 岁</text>
				<text v-if="zpyqs['dinianling'] == 17" class="d-zuo-10 d-wenzi-16">17 岁</text>
				<text v-if="zpyqs['dinianling'] == 20" class="d-zuo-10 d-wenzi-16">20 岁</text>
				<text v-if="zpyqs['dinianling'] == 23" class="d-zuo-10 d-wenzi-16">23 岁</text>
				<text v-if="zpyqs['dinianling'] == 25" class="d-zuo-10 d-wenzi-16">25 岁</text>
				<text v-if="zpyqs['dinianling'] == 30" class="d-zuo-10 d-wenzi-16">30 岁</text>
				<text v-if="zpyqs['dinianling'] == 35" class="d-zuo-10 d-wenzi-16">35 岁</text>
				<text v-if="zpyqs['dinianling'] == 40" class="d-zuo-10 d-wenzi-16">40 岁</text>
				<text v-if="zpyqs['dinianling'] == 45" class="d-zuo-10 d-wenzi-16">45 岁</text>
				<text v-if="zpyqs['dinianling'] == 50" class="d-zuo-10 d-wenzi-16">55 岁</text>
				<text v-if="zpyqs['dinianling'] == 60" class="d-zuo-10 d-wenzi-16">60 岁</text>
				<text v-if="zpyqs['dinianling'] == 60" class="d-zuo-10 d-wenzi-16">60 以上</text>

				</view>
			</view>
			<view class="d-shang-5">
				<view class="d-wenzi-14  d-wenzi-hei">
				<text class="d-wenzi-yanse-hui">工作地区    </text>
				<text class="d-zuo-10 d-wenzi-16 d-wenzi-hei">{{diqua}} - {{diqub}} - {{diquc}}</text>
				</view>
			</view>
			<view v-if="liebiao == 1" class="d-shang-5">
				<view class="d-wenzi-14">
				<text class="d-wenzi-yanse-hui">工作地址    </text>
				<text class="d-zuo-10 d-wenzi-16 d-wenzi-hei">{{gongzuodizhi}}</text>
				</view>
			</view>
			<view v-if="liebiao == 1" class="d-shang-5">
				<view class="d-wenzi-14 d-wenzi-hei">
				<text class="d-wenzi-yanse-hui">岗位福利</text>
				
				<text v-if="fulilist['a']" class="d-zuo-10 d-wenzi-16">五险</text>
				<text v-if="fulilist['b']" class="d-zuo-10 d-wenzi-16">，公积金</text>
				<text v-if="fulilist['c']" class="d-zuo-10 d-wenzi-16">，五险一金</text>
				<text v-if="fulilist['d']" class="d-zuo-10 d-wenzi-16">，员工旅游</text>
				<text v-if="fulilist['e']" class="d-zuo-10 d-wenzi-16">，年终奖金</text>
				<text v-if="fulilist['f']" class="d-zuo-10 d-wenzi-16">，股票期权</text>
				<text v-if="fulilist['g']" class="d-zuo-10 d-wenzi-16">，定期体检</text>
				<text v-if="fulilist['h']" class="d-zuo-10 d-wenzi-16">，专业培训</text>
				<text v-if="fulilist['i']" class="d-zuo-10 d-wenzi-16">，绩效奖金</text>

				</view>
			</view>
			<view v-if="liebiao == 1" class="d-shang-10">
				<view class="d-wenzi-14 d-buhuanhang d-wenzi-hei">
				<text class="d-wenzi-yanse-hui d-shang-5">联系电话</text>
				    <text v-if="keycode">
						<view v-if="zhaopinbiao === 1" class="d-wenzi-yanse-hongse "><view class="d-shang-5 d-zuo-10">招聘结束</view></view>
						<text v-if="zhaopinbiao === 0" class="d-shang-10 d-zuo-10"  @click="fuzhihaoma(zhaopinhaoma)">{{zhaopinhaoma}}</text>
					</text>
					<text v-else class="d-zuo-10 d-wenzi-16 d-wenzi-yanse-hongse" @click="denglu()">【 登录后查看 】</text>
					
				</text>

				</view>
			</view>
		    <view class="d-shang-10 d-yuanjiao-10 d-neikuang-10" :style="[{'background-color': fenggeyanse =='light'? '#ffeae2':'#242424'}]">
				<u-steps :current="zhaopinbiao" :beijing="fenggeyanse =='light'? '#ffeae2':'#242424'"  :inactiveColor="fenggeyanse =='light'? '#ff9346':'#f5f5f5'" :activeColor="fenggeyanse =='light'? '#ff702e':'#ff702e'">
					<u-steps-item title="招聘中" :desc="zhaopintime"></u-steps-item>
					<u-steps-item title="已聘到" :desc="zhaopinbiaotime" ></u-steps-item>
				</u-steps>
			</view>
			<view v-if="liebiao == 1" class="d-zouyou-juzhong" @click="zhaodao()">
				
				<view v-if="guanliyuanuid.is_admin == 1 || fabuuid == dangqianuid" class="d-neikuang-10 d-bian-1-hong d-wenzi-14 d-yuanjiao-50 d-shang-10 d-wenzi-yanse-hongse">
					<view v-if="zhaopinbiao ==0">确认已经聘到</view>
					<view v-if="zhaopinbiao ==1">再次开启招聘</view>
				</view>
			</view>
		</view>
	</view>
	
	
</template>

<script>
	import config from "../../utils/config";
	export default{
		props:{
			aid: {
				type: [String, Number],
				default: ''
			},
			acid: {
				type: [String, Number],
				default: ''
			},
			keycode:{
				type: [String, Number],
				default: ''
			},
			zhaopinhaoma: {
				type: [String, Number],
				default: ''
			},
			zprs:{
				type: [String, Number],
				default: ''
			},
			diqua:{
				type: [String, Number],
				default: ''
			},
			diqub:{
				type: [String, Number],
				default: ''
			},
			diquc:{
				type: [String, Number],
				default: ''
			},
			xinzis:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			zpyqs:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			fulilist:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			zhaopinbiao: {
				type: [String, Number],
				default: ''
			},
			zhaopintime: {
				type: [String, Number],
				default: ''
			},
			zhaopinbiaotime:{
				type: [String, Number],
				default: ''
			},
			gongzuodizhi:{
				type: [String, Number],
				default: ''
			},
			liebiao:{
				type: [String, Number],
				default: ''
			},
			zhaopinintime:{
				type: [String, Number],
				default: ''
			},
			zhaopinuntime:{
				type: [String, Number],
				default: ''
			},
			fabuuid:{
				type: [String, Number],
				default: ''
			},
			dangqianuid:{
				type: [String, Number],
				default: ''
			},
			guanliyuanuid:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			fenggeyanse: {
				type: [String, Number],
				default: ''
			}
		},
		data(){
			return {
				
			}
		},
		
		methods:{
			//帖子
			tiezi(cid,id) {
				//console.log('id',cid);
				this.$emit('tiezi', cid,id);
			},
			// 附件
			/*fujianurl(url) {
				this.$emit('fujianurl', url);
			},
			//云url
			yunurl(url,ma) {
				this.$emit('yunurl', url,ma);
			}*/
			fuzhihaoma(e){
				//console.log(e);
				uni.setClipboardData({
				  data: e,
				  success: function (res) {
				    uni.getClipboardData({
				      success: function (res) {
				        uni.showToast({
				          title: '复制号码成功'+e,
				          //image: "/static/images/uploads/link.png",
				          duration: 2000
				        });
				      }
				    });
				  }
				});
			},
			denglu(){
				uni.showModal({
					title: '请先登录',
					//content: '请先登录',
					confirmText: '前往登录',
					success: function(res) {
						if (res.confirm) {
							
							uni.redirectTo({
								url: '/pages/login/login'
							});
						}
					}
				});
			},
			zhaodao(){
				this.$emit('zhaodao');
			}
		}
	}
</script>

<style lang="scss" scoped>
	
</style>
